#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<bitset>
#include<map>
#include<queue>
using namespace std;
vector<int>ans;
const int N = 2e5 + 10;
map<int, int>mp;
int a[N], b[N];
int n;
struct node
{
	int v;
	int id;
}S[N];

int cmp(node a, node b)
{
	if (a.v != b.v)return a.v > b.v;
	return a.id < b.id;
}
int main()
{
	int t;
	cin >> t;
	while (t--) {
		cin >> n;
		ans.clear();
		for (int i = 1; i <= n; i++) {
			cin >> a[i];
		}
		for (int i = 1; i <= n; i++) {
			cin >> b[i];
			S[i] = { a[i] - b[i],i };
		}
		sort(S + 1, S + n + 1, cmp);
		int x = S[1].v;
		int cnt = 0;
		for (int i = 1; i <= n; i++) {
			if (x == S[i].v) {
				cnt++;
				ans.push_back(S[i].id);
			}
			else break;
		}
		cout << cnt << endl;
		for (int x : ans) {
			cout << x << " ";
		}
		cout << endl;
	}
	return 0;
}